package com.example.vertification.service;

import com.example.vertification.entity.UserAddress;
import com.example.vertification.entity.UserStation;
import com.example.vertification.repository.UserAddressRepository;
import com.example.vertification.repository.UserStationRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserAddressService {


    private final UserAddressRepository userAddressRepository;

    @Autowired
    public UserAddressService(UserAddressRepository userAddressRepository) {
        this.userAddressRepository = userAddressRepository;
    }

    public UserAddress getEntityByUid(long uid) {
        return userAddressRepository.findByUid(uid);
    }


    public UserAddress save(UserAddress e) {
        return userAddressRepository.save(e);
    }


}